stack twitter tryhackme rss linkedin cross

Wilco van Esch

Skip to main content

Search results

    SQLSTATE[40001]: Serialization failure: 1213 Deadlock found

    "SQLSTATE[40001]: Serialization failure: 1213 Deadlock found"

    This error can occur during reindexing.

    Example

    Category Products index is locked by another reindex process. 
    Skipping.
    Product Categories indexer process unknown error:
    SQLSTATE[40001]: Serialization failure: 1213 Deadlock found
    when trying to get lock; try restarting transaction, 
    query was: DELETE FROM catalog_category_product
    WHERE (category_id = ('1050'))

    Cause

    Either another reindex is running, or someone cancelled a previous reindex (in which case indexing for that table will remain locked).

    Solution

    php bin/magento indexer:reset

    php bin/magento indexer:reindex